import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;

//科技成果奖
public class AchievementAward {
    static String Name, Awardee, Number, Credit;
    static ArrayList<String> NameList = new ArrayList<>();
    static ArrayList<String> AwardeeList = new ArrayList<>();
    static ArrayList<String> NumberList = new ArrayList<>();
    static ArrayList<String> CreditList = new ArrayList<>();

    public static void Write() {
        System.out.print("请输入奖项名称:");
        Name = Main.in.nextLine();
        NameList.add(Name);
        System.out.print("请输入获奖者:");
        Awardee = Main.in.nextLine();
        AwardeeList.add(Awardee);
        System.out.print("请输入序号:");
        Number = Main.in.nextLine();
        NumberList.add(Number);
        System.out.print("请输入学分:");
        Credit = Main.in.nextLine();
        CreditList.add(Credit);

        try {
            BufferedWriter AwardWrite = new BufferedWriter(new FileWriter("data/Award.txt", true));
            AwardWrite.newLine();
            AwardWrite.write(Name);
            AwardWrite.write("    ");
            AwardWrite.write(Awardee);
            AwardWrite.write("    ");
            AwardWrite.write(Number);
            AwardWrite.write("    ");
            AwardWrite.write(Credit);
            AwardWrite.close();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }

    public static void Check() {
    }
}
